<?php
/**
 * Created by JetBrains PhpStorm.
 * User: scala
 * Date: 12-10-27
 * Time: 上午12:44
 * To change this template use File | Settings | File Templates.
 */
class MessageReplyModel extends Model
{
    protected $_validate=array(
        array('content','require','输入回复信息！'),
    );



    protected $_auto=array(
        array("createtime","time",Model::MODEL_INSERT,"function"),
        array("replayer","genReplayer",Model::MODEL_INSERT,"callback"),
    );


    function genReplayer(){
        import("ORG.Util.Session");
        if(Session::is_set(C("USER_AUTH_KEY"))){
            return Session::get(C("USER_AUTH_KEY"));
        }else{
            return 0;
        }
    }
}
